package com.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

@Service
public class RedisServiceImpl {
    @Autowired
    private RedisTemplate redisTemplate;

    public void doSth(){
        redisTemplate.opsForValue().set("boot","1234",10, TimeUnit.SECONDS);
    }
}
